package com.db.bankapp.domain.bank;

import com.db.bankapp.exception.NotEnoughFundsException;

/**
 * Represents bank account. Only @link{com.db.bankapp.domain.bank.Bank} can determine available account types.
 */
public interface Account {
    /**
     * Returns current balance
     * @return balance
     */
    int getBalance();

    /**
     * Increases balance by amount
     * @param amount to increase balance
     */
    void deposit(int amount);

    /**
     * Decreases balance by amount
     * @param amount to decrease balance
     */
    void withdraw(int amount) throws NotEnoughFundsException;

    /**
     * Returns available amount of money to spend
     * @return balance plus available credit
     */
    int maximumAmountToWithdraw();
}
